import {
	createSSRApp
} from 'vue'
import App from './App.vue'
import * as Pinia from 'pinia';
import {
	createUnistorage
} from '@/uni_modules/pinia-plugin-unistorage'

// main.ts
import 'virtual:uno.css'

import uvUiTools from '@/uni_modules/uv-ui-tools'

import xt_show_modal from './utils/modal/modal.js'

export function createApp() {
	const app = createSSRApp(App)

	// 状态管理
	const store = Pinia.createPinia()

	// 持久化
	store.use(createUnistorage())
	app.use(store);
	app.use(uvUiTools)
	app.use(xt_show_modal)
	return {
		app,
		Pinia
	}
}